package com.healer.hungery.controller;

import com.healer.hungery.model.MessageOutputVo;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
public class ExceptionController {

    @PostMapping("/except")
    String exceptTest(@RequestBody MessageOutputVo msg){

        return "success";
    }

    @ExceptionHandler(Exception.class)
    @ResponseStatus(value = HttpStatus.FORBIDDEN)
    String testHandler(Exception e){
        return "ExceptHandlerController";
    }
}
